l=["明月","何时","照我还","何时","照我还","明月","何时","照我还","明月"]

# 定义空集合
s = set()

# for循环遍历
for e in l:
    print(f"the elements of the list:{e}")
    # 得到元素并添加
    s.add(e)

# 去重后的集合对象打印输出
print(s)